package types;

/**
 * 表示搜索查询的类
 */
public class SearchQuery {
    private String term;
    private boolean includeContent;
    private int limit;

    /**
     * 创建一个新的搜索查询
     * 
     * @param term 搜索词
     */
    public SearchQuery(String term) {
        this.term = term;
        this.includeContent = false;
        this.limit = 0;
    }

    /**
     * 创建一个新的搜索查询
     * 
     * @param term 搜索词
     * @param includeContent 是否包含内容
     * @param limit 结果限制数量
     */
    public SearchQuery(String term, boolean includeContent, int limit) {
        this.term = term;
        this.includeContent = includeContent;
        this.limit = limit;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public boolean isIncludeContent() {
        return includeContent;
    }

    public void setIncludeContent(boolean includeContent) {
        this.includeContent = includeContent;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }
}